<template>
	<view class="login main">
		<image class="logo" src="../../static/img/logo.png"></image>
		<view class="input-item">
			<input type="text" v-model="name" focus placeholder="请输入账号" >
		</view>
		<view class="input-item">
			<input type="password" v-model="password" focus placeholder="请输入密码" >
		</view>
		<view class="register">
			<navigator url="register">我是新人！</navigator>
			<navigator url="getPassword">忘记密码？</navigator>
		</view>
		<button type="primary" @tap="upImage()" class="sub-button">提交</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: '',
				password:''
			}
		},
		onLoad() {
			
		},
		methods: {
			upImage(){
				// uni.chooseImage({
				// 	success: (chooseImageRes) => {
				// 		const tempFilePaths = chooseImageRes.tempFilePaths;
				// 		uni.uploadFile({
				// 			url: 'https://www.example.com/upload', //仅为示例，非真实的接口地址
				// 			filePath: tempFilePaths[0],
				// 			name: 'file',
				// 			formData: {
				// 				'user': 'test'
				// 			},
				// 			success: (uploadFileRes) => {
				// 				console.log(uploadFileRes.data);
				// 			}
				// 		});
				// 	}
				// });
			}
		}
	}
</script>

<style>
	.login {
		height: 400upx;
		padding: 100upx 20upx;
	}
	.login .logo{width: 200upx;height: 200upx;display: block;margin: 0 auto 50upx;}
	.login .register{
		display:flex;justify-content: space-between;color: #666;padding:0 20upx;
	}
	.login .sub-button{margin: 90upx auto 0;display: block; width: 600upx;height: 90upx;
	line-height: 90upx;}
</style>
